﻿@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<style>
    .title {
        font-size: 40px;
        text-align: center;
        font-weight: 600
    }

    #bac {
        display: none;
    }

    #warning1 {
        display: none;
    }
</style>

<div id="bac" class="bac" style="position:fixed; top:0; bottom:0;
width:100%; background-color:white; z-index:8; overflow:scroll;">
    <div style="height:40px"></div>
    <div class="row">
        <div class="col-12 title">
            注册账号
        </div>
    </div>
    <div style="margin:auto;height:45px;width:75px; color:#ffc107; border-bottom: 3px solid;
    padding-bottom:10px; margin-top:10px" class="text-center">
        <h2>注册</h2>
    </div>
    <div style="margin:auto; width:100%; text-align:center; margin-top:5px; margin-bottom:4px;
    background-color:#f4d9d9; color:red" id="time">使用相同的姓名、学号、用户名注册将导致注册失败！</div>
    <br />
    <form method="post" asp-page-handler="R" style="width:92%; margin:auto; margin-bottom:10px">
        <div class="form-group">
            <input asp-for="Name_New" placeholder="姓名" class="form-control form-control-lg" />
        </div>
        <div class="form-group">
            <input asp-for="Student_ID_New" placeholder="学号" class="form-control form-control-lg" />
        </div>
        <div class="form-group">
            <input asp-for="WeiXinID_New" placeholder="微信号" class="form-control form-control-lg" />
        </div>
        <div class="form-group">
            <input asp-for="PhoneID_New" placeholder="手机号" class="form-control form-control-lg" />
        </div>
        <div class="form-group">
            <input asp-for="Account_New" placeholder="用户名，长度要求：[5,15]" class="form-control form-control-lg" />
        </div>
        <div class="form-group">
            <input asp-for="Password1_New" id="pwd1" placeholder="密码，长度要求：[5,15]" class="form-control form-control-lg" type="password" />
        </div>
        <div class="form-group" style="margin-bottom:5px">
            <input asp-for="Password2_New" id="pwd2" onkeyup="isEqual()" placeholder="重复密码" class="form-control form-control-lg" type="password" />
        </div>
        <div id="warning1" style="margin-top:-5px; color:red">*两次密码不一致</div>
        <button type="submit" style="color:white; margin-top:15px" class="btn btn-warning btn-block btn-lg">注册</button>
    </form>
    <div style="width:92%;text-align:left; margin-top:15px; margin-bottom:50px; font-size:16px; margin:auto">
        已有账号？<a id="bacb" style="color:#ffc107; cursor:pointer">立即登录</a>
    </div>
    <div style="height:40px"></div>
</div>
<div style="height:70px">
</div>

<div class="row">
    <div class="col-12 title">
        蓝图研发报名
    </div>
</div>
<div style="height:20px; font-size:18px; margin-bottom:5px; font-weight:600; color:#808080" class="text-center">
    蓝图主页 & 蓝图未来小程序
</div>
<div style="height:20px; font-size:18px; font-weight:600; color:#808080" class="text-center">
    室外导览机器人 & 班团系统
</div>
<br />
<br />
<div style="margin:auto;height:45px;width:75px; color:#2b92f9; border-bottom: 3px solid; padding-bottom:10px" class="text-center">
    <h2>登录</h2>
</div>
<br />
<br />
<form style="width:92%; margin:auto" method="post" asp-page-handler="L">
    <div class="form-group">
        <input asp-for="Account" placeholder="用户名" class="form-control form-control-lg" />
    </div>
    <div class="form-group">
        <input asp-for="Password" placeholder="密码" class="form-control form-control-lg" type="password" />
    </div>
    <button type="submit" class="btn btn-primary btn-block btn-lg">登录</button>
    <div style="width:92%;text-align:left; margin-top:10px; margin-bottom:10px; font-size:16px">
        没有账号？<a id="baca" style="color:#2b92f9; cursor:pointer">立即注册</a>
    </div>
</form>


<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script>
    $("#baca").click(function () {
        $("#bac").slideDown()
    })
    $("#bacb").click(function () {
        $("#bac").slideUp()
    })
    function isEqual() {
        var pwd1 = $("#pwd1").val();
        var pwd2 = $("#pwd2").val();
        if (pwd1 != pwd2) {
            $("#warning1").slideDown();
        } else {
            $("#warning1").slideUp();
        }
    }
</script>